import App from '../App.vue'

// 此文件做模块路由配置
import home from '../frame/home/Home.vue'
import login from '../frame/login/Login.vue'
import Reading from '../modules/Reading.vue'

const routes = [{
    path: '/',
    component: App, // 顶层路由，对应index.html
    children: [ // 二级路由。对应App.vue
        { // 地址为空时跳转index页面
            path: '',
            redirect: '/home',
            meta: {
                requireAuth: true
            }
        },
        { // 首页
            path: '/home',
            component: home,
            meta: {
                requireAuth: true
            },
          children: [
            {
              path: '/members/list',
              component: Reading
            },{
              path: '/base/menu/list',
              name: 'dashboard',
              component: () => import('@/modules/base/menu/List.vue'),
              meta: {contentHeader: {title: '系统管理', subTitle: '菜单管理'}}
            },
            {
              path: '/base/macro/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/log/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/quartz/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/generator/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/druid/index',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/rulegroup/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/riskrule/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/riskcql/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/ruleparameter/list',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/risk2/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/riskresultsinfo/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/risklog/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/org/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/role/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            },
            {
              path: '/base/user/list',
              name: 'dashboard',
              component: () => import('@/modules/dashboard/List.vue'),
              meta: {contentHeader: {title: '看板', subTitle: '控制面板'}}
            }
          ]
        },
        { // 登录
            path: '/login',
            component: login
        }
    ]
}]

export default routes
